#include<iostream>
#include<cstring>

using namespace std;

int book[30];

int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		bool flag=false;
		memset(book,0,sizeof book);
		string s;
		cin>>s;
		for(int i=0;i<s.size();i++)
		{
			book[s[i]-'a']++;
			if(book[s[i]-'a']>1) 
			{
				puts("NO");
				flag=true;
				break;
			}
		}
		if(flag) continue;
		while(s.size())
		{
			if(s.size() == 1 && s[0] == 'a') 
			{
				puts("YES");
				break;
			}
			if(s[0]>s[s.size()-1])
			{
				if(s[0]-s[s.size()-1] == 1) s.erase(0,1);
				else if(s[0] - s[1] == 1) s.erase(0,1);
				else 
				{
					puts("NO");
					break;
				}
			}
			else
			{
				if(s[s.size()-1]-s[0] == 1) s.erase(s.size()-1,1);
				else if(s[s.size()-1]-s[s.size()-2] == 1) s.erase(s.size()-1,1);
				else
				{
					puts("NO");
					break;
				}
			}
		}
	}
	return 0;
}

______________________________________________________________________________________________


#include<iostream>

using namespace std;

int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		string s;
		cin>>s;
		while(s.size())
		{
			if(s[0] - 'a' == s.size()-1) s.erase(0,1);
			else if(s[s.size()-1] - 'a' == s.size()-1) s.erase(s.size()-1,1);
			else break;
		}
		puts(s.size() ? "NO":"YES");
	}
	return 0;
}
